package com.longcai.piaojia.conn;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/8/31.
 */
@HttpInlet(Conn.USERS_MOD_PASS)
public class UpdatePasswordPost extends BaseAsyPost<String> {

    public String user_id, user_pass_new, user_pass_old;

    public UpdatePasswordPost(AsyCallBack<String> asyCallBack) {
        super(asyCallBack);
    }

    @Override
    protected String parser(JSONObject object) throws Exception {

        TOAST = object.optString("message");

        if(object.optInt("code")==200){

            JSONObject jsonObject = object.optJSONObject("data");

            return jsonObject.optString("user_id");

        }

        return null;
    }

}
